<?php

/**
 * 违规小类控制器
 * @author yuzy 2015-5-13
 */

namespace mybackend\controllers;

use common\services\myhtsq\ViolatedLittlerCategoryService;

class ViolatedLittlerCategoryController extends BaseController {

    protected $_littlerCategoryService;

    public function __construct($id, $module, ViolatedLittlerCategoryService $littlerCategoryService, $config = []) {
        $this->_littlerCategoryService = $littlerCategoryService;
        parent::__construct($id, $module, $config);
    }

    /**
     * 违规小类列表
     * @return array
     */
    public function actionGetViolatedLittlerCategoryListForDdl($categoryId) {
        $result = $this->_littlerCategoryService->getViolatedLittlerCategoryListForDdl($categoryId);
        $this->exportJson($result, $this->_littlerCategoryService->getErrCode(), $this->_littlerCategoryService->getErrMsg()); 
    }
}
